<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TMCStepper: src/source/TMC2130Stepper.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">TMCStepper
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_t_m_c2130_stepper_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">TMC2130Stepper.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_t_m_c2130_stepper_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_t_m_c_stepper_8h.html">TMCStepper.h</a>&quot;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_t_m_c___m_a_c_r_o_s_8h.html">TMC_MACROS.h</a>&quot;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;int8_t <a class="code" href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">TMC2130Stepper::chain_length</a> = 0;</div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;uint32_t <a class="code" href="class_t_m_c2130_stepper.html#ac4690ace6da9c458fdd2ab9b972c741b">TMC2130Stepper::spi_speed</a> = 16000000/8;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a5ba7c4f0262fc2715b47e33c2e419fea">    7</a></span>&#160;<a class="code" href="class_t_m_c2130_stepper.html#a5ba7c4f0262fc2715b47e33c2e419fea">TMC2130Stepper::TMC2130Stepper</a>(uint16_t pinCS, <span class="keywordtype">float</span> RS, int8_t link) :</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;  <a class="code" href="class_t_m_c_stepper.html">TMCStepper</a>(RS),</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;  _pinCS(pinCS),</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;  link_index(link)</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;  {</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#abd1d08df305673b41b1b9c3106fb9c68">defaults</a>();</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <span class="keywordflow">if</span> (link &gt; <a class="code" href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">chain_length</a>)</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">chain_length</a> = link;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  }</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a44c636442b01830f578657594f11551d">   18</a></span>&#160;<a class="code" href="class_t_m_c2130_stepper.html#a5ba7c4f0262fc2715b47e33c2e419fea">TMC2130Stepper::TMC2130Stepper</a>(uint16_t pinCS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link) :</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  <a class="code" href="class_t_m_c_stepper.html">TMCStepper</a>(default_RS),</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  _pinCS(pinCS),</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  link_index(link)</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  {</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <a class="code" href="class_s_w___s_p_i_class.html">SW_SPIClass</a> *SW_SPI_Obj = <span class="keyword">new</span> <a class="code" href="class_s_w___s_p_i_class.html">SW_SPIClass</a>(pinMOSI, pinMISO, pinSCK);</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a> = SW_SPI_Obj;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#abd1d08df305673b41b1b9c3106fb9c68">defaults</a>();</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keywordflow">if</span> (link &gt; <a class="code" href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">chain_length</a>)</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">chain_length</a> = link;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  }</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a510d8d22b74e8e321cbe45504e7bcecd">   31</a></span>&#160;<a class="code" href="class_t_m_c2130_stepper.html#a5ba7c4f0262fc2715b47e33c2e419fea">TMC2130Stepper::TMC2130Stepper</a>(uint16_t pinCS, <span class="keywordtype">float</span> RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK, int8_t link) :</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  <a class="code" href="class_t_m_c_stepper.html">TMCStepper</a>(RS),</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  _pinCS(pinCS),</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  link_index(link)</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  {</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <a class="code" href="class_s_w___s_p_i_class.html">SW_SPIClass</a> *SW_SPI_Obj = <span class="keyword">new</span> <a class="code" href="class_s_w___s_p_i_class.html">SW_SPIClass</a>(pinMOSI, pinMISO, pinSCK);</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a> = SW_SPI_Obj;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#abd1d08df305673b41b1b9c3106fb9c68">defaults</a>();</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordflow">if</span> (link &gt; <a class="code" href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">chain_length</a>)</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">chain_length</a> = link;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  }</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#abd1d08df305673b41b1b9c3106fb9c68">   44</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#abd1d08df305673b41b1b9c3106fb9c68">TMC2130Stepper::defaults</a>() {</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  <span class="comment">//MSLUT0_register.sr = ???;</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <span class="comment">//MSLUT1_register.sr = ???;</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  <span class="comment">//MSLUT2_register.sr = ???;</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  <span class="comment">//MSLUT3_register.sr = ???;</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <span class="comment">//MSLUT4_register.sr = ???;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <span class="comment">//MSLUT5_register.sr = ???;</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <span class="comment">//MSLUT6_register.sr = ???;</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <span class="comment">//MSLUT7_register.sr = ???;</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <span class="comment">//MSLUTSTART_register.start_sin90 = 247;</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  PWMCONF_register.sr = 0x00050480;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;}</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a44165ac44cbbe2efb678c764ac5ecf4c">   57</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a44165ac44cbbe2efb678c764ac5ecf4c">TMC2130Stepper::setSPISpeed</a>(uint32_t speed) {</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#ac4690ace6da9c458fdd2ab9b972c741b">spi_speed</a> = speed;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;}</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">   61</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">TMC2130Stepper::switchCSpin</a>(<span class="keywordtype">bool</span> state) {</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  digitalWrite(<a class="code" href="class_t_m_c2130_stepper.html#a6d38cdca5d67036d37e2de754ad6a8e4">_pinCS</a>, state);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">   65</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">TMC2130Stepper::read</a>(uint8_t addressByte) {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  uint32_t out = 0UL;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  int8_t i = 1;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a> != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(LOW);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(addressByte &amp; 0xFF);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(0x0000); <span class="comment">// Clear SPI</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(0x0000);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="comment">// Shift the written data to the correct driver in chain</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="comment">// Default link_index = -1 and no shifting happens</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordflow">while</span>(i &lt; <a class="code" href="class_t_m_c2130_stepper.html#a4d44a7e893bf6c18e0dec7c2f14146cf">link_index</a>) {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(0x0000);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(0x0000);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(0x00);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;      i++;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    }</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(HIGH);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(LOW);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="comment">// Shift data from target link into the last one...</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordflow">while</span>(i &lt; <a class="code" href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">chain_length</a>) {</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(0x0000);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(0x0000);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(0x00);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      i++;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    }</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="comment">// ...and once more to MCU</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a5e062fc252bb37ef04ccb6c8b2d248e6">status_response</a> = <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(addressByte &amp; 0xFF); <span class="comment">// Send the address byte again</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    out  = <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(0x00);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    out &lt;&lt;= 8;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    out |= <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(0x00);</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    out &lt;&lt;= 8;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    out |= <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(0x00);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    out &lt;&lt;= 8;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    out |= <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(0x00);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    SPI.beginTransaction(SPISettings(<a class="code" href="class_t_m_c2130_stepper.html#ac4690ace6da9c458fdd2ab9b972c741b">spi_speed</a>, MSBFIRST, SPI_MODE3));</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(LOW);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    SPI.transfer(addressByte &amp; 0xFF);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    SPI.transfer16(0x0000); <span class="comment">// Clear SPI</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    SPI.transfer16(0x0000);</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="comment">// Shift the written data to the correct driver in chain</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="comment">// Default link_index = -1 and no shifting happens</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="keywordflow">while</span>(i &lt; <a class="code" href="class_t_m_c2130_stepper.html#a4d44a7e893bf6c18e0dec7c2f14146cf">link_index</a>) {</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;      SPI.transfer16(0x0000);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;      SPI.transfer16(0x0000);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;      SPI.transfer(0x0000);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;      i++;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    }</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(HIGH);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(LOW);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="comment">// Shift data from target link into the last one...</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordflow">while</span>(i &lt; <a class="code" href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">chain_length</a>) {</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;      SPI.transfer16(0x0000);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;      SPI.transfer16(0x0000);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;      SPI.transfer(0x0000);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;      i++;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    }</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="comment">// ...and once more to MCU</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a5e062fc252bb37ef04ccb6c8b2d248e6">status_response</a> = SPI.transfer(addressByte &amp; 0xFF); <span class="comment">// Send the address byte again</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    out  = SPI.transfer(0x00);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    out &lt;&lt;= 8;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    out |= SPI.transfer(0x00);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    out &lt;&lt;= 8;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    out |= SPI.transfer(0x00);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    out &lt;&lt;= 8;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    out |= SPI.transfer(0x00);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    SPI.endTransaction();</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  }</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(HIGH);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;}</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">  148</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">TMC2130Stepper::write</a>(uint8_t addressByte, uint32_t config) {</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  addressByte |= <a class="code" href="class_t_m_c_stepper.html#ada185e5fe9970deb7d488cee26314878">TMC_WRITE</a>;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;  int8_t i = 1;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a> != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(LOW);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a5e062fc252bb37ef04ccb6c8b2d248e6">status_response</a> = <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(addressByte &amp; 0xFF);</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>((config&gt;&gt;16) &amp; 0xFFFF);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(config &amp; 0xFFFF);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160; </div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="comment">// Shift the written data to the correct driver in chain</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="comment">// Default link_index = -1 and no shifting happens</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordflow">while</span>(i &lt; <a class="code" href="class_t_m_c2130_stepper.html#a4d44a7e893bf6c18e0dec7c2f14146cf">link_index</a>) {</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(0x0000);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(0x0000);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;      <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(0x00);</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;      i++;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    }</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;  } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    SPI.beginTransaction(SPISettings(<a class="code" href="class_t_m_c2130_stepper.html#ac4690ace6da9c458fdd2ab9b972c741b">spi_speed</a>, MSBFIRST, SPI_MODE3));</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(LOW);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a5e062fc252bb37ef04ccb6c8b2d248e6">status_response</a> = SPI.transfer(addressByte &amp; 0xFF);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    SPI.transfer16((config&gt;&gt;16) &amp; 0xFFFF);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    SPI.transfer16(config &amp; 0xFFFF);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    </div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="comment">// Shift the written data to the correct driver in chain</span></div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="comment">// Default link_index = -1 and no shifting happens</span></div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keywordflow">while</span>(i &lt; <a class="code" href="class_t_m_c2130_stepper.html#a4d44a7e893bf6c18e0dec7c2f14146cf">link_index</a>) {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;      SPI.transfer16(0x0000);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;      SPI.transfer16(0x0000);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;      SPI.transfer(0x0000);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;      i++;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    }</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    </div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    SPI.endTransaction();</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;  }</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(HIGH);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;}</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160; </div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a2d19f2ad93b00b75ffdcdd73275d2f03">  186</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a2d19f2ad93b00b75ffdcdd73275d2f03">TMC2130Stepper::begin</a>() {</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  <span class="comment">//set pins</span></div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;  pinMode(<a class="code" href="class_t_m_c2130_stepper.html#a6d38cdca5d67036d37e2de754ad6a8e4">_pinCS</a>, OUTPUT);</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">switchCSpin</a>(HIGH);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a> != <span class="keyword">nullptr</span>) <a class="code" href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC_SW_SPI</a>-&gt;<a class="code" href="class_s_w___s_p_i_class.html#aa35a68a7e184e42445f391876e58dd68">init</a>();</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#aee84a9abfc84b387c6ae5658f90bf684">GCONF</a>(GCONF_register.sr);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a67541b27d97ce45f175e9f6e4a2d0bff">CHOPCONF</a>(CHOPCONF_register.sr);</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#abc48be984238d94bb3b72ed3aa26f028">COOLCONF</a>(COOLCONF_register.sr);</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a357d105f7350a08dfad82c05a39042eb">PWMCONF</a>(PWMCONF_register.sr);</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a597bc308bad0d1198b98c48a6ef34fc3">IHOLD_IRUN</a>(IHOLD_IRUN_register.sr);</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#ac34bf4add4f669e935f2a91e1b42817c">toff</a>(8); <span class="comment">//off_time(8);</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#ae54d816846ca2103976f490c5ab8e887">tbl</a>(1); <span class="comment">//blank_time(24);</span></div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;}</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160; </div>
<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#aca7a615bce307a631a6118fd95cc9195">  207</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2130_stepper.html#aca7a615bce307a631a6118fd95cc9195">TMC2130Stepper::isEnabled</a>() { <span class="keywordflow">return</span> !<a class="code" href="class_t_m_c2130_stepper.html#a838f3e6896ee64d6c8e203e9d5883667">drv_enn_cfg6</a>() &amp;&amp; <a class="code" href="class_t_m_c2130_stepper.html#ac34bf4add4f669e935f2a91e1b42817c">toff</a>(); }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160; </div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#ac62d32ad08be0a34b411bdd5a8489246">  209</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#ac62d32ad08be0a34b411bdd5a8489246">TMC2130Stepper::push</a>() {</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#aee84a9abfc84b387c6ae5658f90bf684">GCONF</a>(GCONF_register.sr);</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a597bc308bad0d1198b98c48a6ef34fc3">IHOLD_IRUN</a>(IHOLD_IRUN_register.sr);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">TPOWERDOWN</a>(TPOWERDOWN_register.sr);</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">TPWMTHRS</a>(TPWMTHRS_register.sr);</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a5db9c2e01d8c1994a5c58d0bf0b1d9b1">TCOOLTHRS</a>(TCOOLTHRS_register.sr);</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a8e7d22e8bc39e89b4a02ad1460e4cf25">THIGH</a>(THIGH_register.sr);</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#af486cd4712be021c735fc3bcb8eee9f5">XDIRECT</a>(XDIRECT_register.sr);</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a4389f7f07c57d2267351b781c6031fb4">VDCMIN</a>(VDCMIN_register.sr);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a67541b27d97ce45f175e9f6e4a2d0bff">CHOPCONF</a>(CHOPCONF_register.sr);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#abc48be984238d94bb3b72ed3aa26f028">COOLCONF</a>(COOLCONF_register.sr);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a1a90b2919efe61dd825552c2fbeca993">DCCTRL</a>(DCCTRL_register.sr);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a357d105f7350a08dfad82c05a39042eb">PWMCONF</a>(PWMCONF_register.sr);</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#ae9ccc393519579143c2afb67da9d02a3">ENCM_CTRL</a>(ENCM_CTRL_register.sr);</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;}</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160; </div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;<span class="comment">// R: IOIN</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">  227</a></span>&#160;uint32_t  <a class="code" href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">TMC2130Stepper::IOIN</a>()    { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">read</a>(<a class="code" href="struct_i_o_i_n__t.html#a3f04842e776dc3d242513f85ad906a92">IOIN_t::address</a>); }</div>
<div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a3850472aefc14da68ece4565fa45e5b0">  228</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2130_stepper.html#a3850472aefc14da68ece4565fa45e5b0">TMC2130Stepper::step</a>()         { <a class="code" href="struct_i_o_i_n__t.html">IOIN_t</a> r{0}; r.<a class="code" href="struct_i_o_i_n__t.html#a78bda2f6a9ab0452f569fb95e980bea5">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">IOIN</a>(); <span class="keywordflow">return</span> r.step; }</div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a200657a7d5d0dbae42f42447e21c58ae">  229</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2130_stepper.html#a200657a7d5d0dbae42f42447e21c58ae">TMC2130Stepper::dir</a>()          { <a class="code" href="struct_i_o_i_n__t.html">IOIN_t</a> r{0}; r.<a class="code" href="struct_i_o_i_n__t.html#a78bda2f6a9ab0452f569fb95e980bea5">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">IOIN</a>(); <span class="keywordflow">return</span> r.dir; }</div>
<div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a1cfb671dae78bb8d5d8aee0402d0c837">  230</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2130_stepper.html#a1cfb671dae78bb8d5d8aee0402d0c837">TMC2130Stepper::dcen_cfg4</a>()    { <a class="code" href="struct_i_o_i_n__t.html">IOIN_t</a> r{0}; r.<a class="code" href="struct_i_o_i_n__t.html#a78bda2f6a9ab0452f569fb95e980bea5">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">IOIN</a>(); <span class="keywordflow">return</span> r.dcen_cfg4; }</div>
<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a024b9486d8020acf450798ae80ff4f23">  231</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2130_stepper.html#a024b9486d8020acf450798ae80ff4f23">TMC2130Stepper::dcin_cfg5</a>()    { <a class="code" href="struct_i_o_i_n__t.html">IOIN_t</a> r{0}; r.<a class="code" href="struct_i_o_i_n__t.html#a78bda2f6a9ab0452f569fb95e980bea5">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">IOIN</a>(); <span class="keywordflow">return</span> r.dcin_cfg5; }</div>
<div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a838f3e6896ee64d6c8e203e9d5883667">  232</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2130_stepper.html#a838f3e6896ee64d6c8e203e9d5883667">TMC2130Stepper::drv_enn_cfg6</a>() { <a class="code" href="struct_i_o_i_n__t.html">IOIN_t</a> r{0}; r.<a class="code" href="struct_i_o_i_n__t.html#a78bda2f6a9ab0452f569fb95e980bea5">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">IOIN</a>(); <span class="keywordflow">return</span> r.drv_enn_cfg6; }</div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a6ef670298206ae7bf6baf8475e20ce37">  233</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2130_stepper.html#a6ef670298206ae7bf6baf8475e20ce37">TMC2130Stepper::dco</a>()          { <a class="code" href="struct_i_o_i_n__t.html">IOIN_t</a> r{0}; r.<a class="code" href="struct_i_o_i_n__t.html#a78bda2f6a9ab0452f569fb95e980bea5">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">IOIN</a>(); <span class="keywordflow">return</span> r.dco; }</div>
<div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a9617bb918094d98baef1980d0f869dc2">  234</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2130_stepper.html#a9617bb918094d98baef1980d0f869dc2">TMC2130Stepper::version</a>()   { <a class="code" href="struct_i_o_i_n__t.html">IOIN_t</a> r{0}; r.<a class="code" href="struct_i_o_i_n__t.html#a78bda2f6a9ab0452f569fb95e980bea5">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">IOIN</a>(); <span class="keywordflow">return</span> r.version; }</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;<span class="comment">// W: TCOOLTHRS</span></div>
<div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a5db9c2e01d8c1994a5c58d0bf0b1d9b1">  237</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2130_stepper.html#a5db9c2e01d8c1994a5c58d0bf0b1d9b1">TMC2130Stepper::TCOOLTHRS</a>() { <span class="keywordflow">return</span> TCOOLTHRS_register.sr; }</div>
<div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#afb052ee9867eb46c7b58455845fa0a94">  238</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a5db9c2e01d8c1994a5c58d0bf0b1d9b1">TMC2130Stepper::TCOOLTHRS</a>(uint32_t input) {</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;  TCOOLTHRS_register.sr = input;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(TCOOLTHRS_register.address, TCOOLTHRS_register.sr);</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;}</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;<span class="comment">// W: THIGH</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a8e7d22e8bc39e89b4a02ad1460e4cf25">  244</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2130_stepper.html#a8e7d22e8bc39e89b4a02ad1460e4cf25">TMC2130Stepper::THIGH</a>() { <span class="keywordflow">return</span> THIGH_register.sr; }</div>
<div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a99721a32fb8c378a67de175a90a87ce5">  245</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a8e7d22e8bc39e89b4a02ad1460e4cf25">TMC2130Stepper::THIGH</a>(uint32_t input) {</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;  THIGH_register.sr = input;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(THIGH_register.address, THIGH_register.sr);</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;}</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;<span class="comment">// RW: XDIRECT</span></div>
<div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#af486cd4712be021c735fc3bcb8eee9f5">  251</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2130_stepper.html#af486cd4712be021c735fc3bcb8eee9f5">TMC2130Stepper::XDIRECT</a>() {</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">read</a>(XDIRECT_register.address);</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;}</div>
<div class="line"><a name="l00254"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a879bf37d4369f73fe5e238c8181d1dd1">  254</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#af486cd4712be021c735fc3bcb8eee9f5">TMC2130Stepper::XDIRECT</a>(uint32_t input) {</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;  XDIRECT_register.sr = input;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(XDIRECT_register.address, XDIRECT_register.sr);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;}</div>
<div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a11e7ca8148bc856a18af9fa0394a647d">  258</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#ac05adb95ef728ef435bf8798adeda888">TMC2130Stepper::coil_A</a>(int16_t B)  { XDIRECT_register.coil_A = B; <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(XDIRECT_register.address, XDIRECT_register.sr); }</div>
<div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a40464704d8da6ad1998cb0c1ea564cce">  259</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a43481d6754741d995b69a82e83076573">TMC2130Stepper::coil_B</a>(int16_t B)  { XDIRECT_register.coil_B = B; <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(XDIRECT_register.address, XDIRECT_register.sr); }</div>
<div class="line"><a name="l00260"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#ac05adb95ef728ef435bf8798adeda888">  260</a></span>&#160;int16_t <a class="code" href="class_t_m_c2130_stepper.html#ac05adb95ef728ef435bf8798adeda888">TMC2130Stepper::coil_A</a>()        { <a class="code" href="struct_x_d_i_r_e_c_t__t.html">XDIRECT_t</a> r{0}; r.<a class="code" href="struct_x_d_i_r_e_c_t__t.html#a587afc7ed2594677b6933e82e15f2a9f">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#af486cd4712be021c735fc3bcb8eee9f5">XDIRECT</a>(); <span class="keywordflow">return</span> r.coil_A; }</div>
<div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a43481d6754741d995b69a82e83076573">  261</a></span>&#160;int16_t <a class="code" href="class_t_m_c2130_stepper.html#a43481d6754741d995b69a82e83076573">TMC2130Stepper::coil_B</a>()        { <a class="code" href="struct_x_d_i_r_e_c_t__t.html">XDIRECT_t</a> r{0}; r.<a class="code" href="struct_x_d_i_r_e_c_t__t.html#a587afc7ed2594677b6933e82e15f2a9f">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#af486cd4712be021c735fc3bcb8eee9f5">XDIRECT</a>(); <span class="keywordflow">return</span> r.coil_B; }</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;<span class="comment">// W: VDCMIN</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a4389f7f07c57d2267351b781c6031fb4">  264</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2130_stepper.html#a4389f7f07c57d2267351b781c6031fb4">TMC2130Stepper::VDCMIN</a>() { <span class="keywordflow">return</span> VDCMIN_register.sr; }</div>
<div class="line"><a name="l00265"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a29941b78911da3748a9be6f616e2456d">  265</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a4389f7f07c57d2267351b781c6031fb4">TMC2130Stepper::VDCMIN</a>(uint32_t input) {</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;  VDCMIN_register.sr = input;</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(VDCMIN_register.address, VDCMIN_register.sr);</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;}</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;<span class="comment">// RW: DCCTRL</span></div>
<div class="line"><a name="l00271"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#ae9a34eefa766c1c5f8bda09acb1e61c1">  271</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a1a90b2919efe61dd825552c2fbeca993">TMC2130Stepper::DCCTRL</a>(uint32_t input) {</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    DCCTRL_register.sr = input;</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(DCCTRL_register.address, DCCTRL_register.sr);</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;}</div>
<div class="line"><a name="l00275"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a5b90d46cecffc6511b6bb95943b30bdb">  275</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a4781278716fa3c2a5204bb1b45da4fee">TMC2130Stepper::dc_time</a>(uint16_t input) {</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    DCCTRL_register.dc_time = input;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(DCCTRL_register.address, DCCTRL_register.sr);</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;}</div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a55ea165bcc2fc0da6395340f17e47611">  279</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#aafabeef9ffd19821104d0b00488b7115">TMC2130Stepper::dc_sg</a>(uint8_t input) {</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    DCCTRL_register.dc_sg = input;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(DCCTRL_register.address, DCCTRL_register.sr);</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;}</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a1a90b2919efe61dd825552c2fbeca993">  284</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2130_stepper.html#a1a90b2919efe61dd825552c2fbeca993">TMC2130Stepper::DCCTRL</a>() {</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">read</a>(DCCTRL_register.address);</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;}</div>
<div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a4781278716fa3c2a5204bb1b45da4fee">  287</a></span>&#160;uint16_t <a class="code" href="class_t_m_c2130_stepper.html#a4781278716fa3c2a5204bb1b45da4fee">TMC2130Stepper::dc_time</a>() {</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <a class="code" href="struct_d_c_c_t_r_l__t.html">DCCTRL_t</a> r{0};</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  r.<a class="code" href="struct_d_c_c_t_r_l__t.html#afbb03a0028a1f1deaec871923efb876c">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#a1a90b2919efe61dd825552c2fbeca993">DCCTRL</a>();</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <span class="keywordflow">return</span> r.dc_time;</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;}</div>
<div class="line"><a name="l00292"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#aafabeef9ffd19821104d0b00488b7115">  292</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2130_stepper.html#aafabeef9ffd19821104d0b00488b7115">TMC2130Stepper::dc_sg</a>() {</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <a class="code" href="struct_d_c_c_t_r_l__t.html">DCCTRL_t</a> r{0};</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  r.<a class="code" href="struct_d_c_c_t_r_l__t.html#afbb03a0028a1f1deaec871923efb876c">sr</a> = <a class="code" href="class_t_m_c2130_stepper.html#a1a90b2919efe61dd825552c2fbeca993">DCCTRL</a>();</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    <span class="keywordflow">return</span> r.dc_sg;</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;}</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="comment">// R: PWM_SCALE</span></div>
<div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#ad207fa693692567d117d4b02c217a4e9">  299</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2130_stepper.html#ad207fa693692567d117d4b02c217a4e9">TMC2130Stepper::PWM_SCALE</a>() { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">read</a>(<a class="code" href="struct_t_m_c2130_stepper_1_1_p_w_m___s_c_a_l_e__t.html#aa55b8961cd861f6156aa601d246b13f7">PWM_SCALE_t::address</a>); }</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="comment">// W: ENCM_CTRL</span></div>
<div class="line"><a name="l00302"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#ae9ccc393519579143c2afb67da9d02a3">  302</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2130_stepper.html#ae9ccc393519579143c2afb67da9d02a3">TMC2130Stepper::ENCM_CTRL</a>() { <span class="keywordflow">return</span> ENCM_CTRL_register.sr; }</div>
<div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#af193f7a3cecbeff29d0db36a2c8b3094">  303</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#ae9ccc393519579143c2afb67da9d02a3">TMC2130Stepper::ENCM_CTRL</a>(uint8_t input) {</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;  ENCM_CTRL_register.sr = input;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;  <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(ENCM_CTRL_register.address, ENCM_CTRL_register.sr);</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;}</div>
<div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a2b9ce2adcc443caffeefa9b51bcb5ee8">  307</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a45d957e059ba8d375a4b880254f442f9">TMC2130Stepper::inv</a>(<span class="keywordtype">bool</span> B)      { ENCM_CTRL_register.inv = B;       <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(ENCM_CTRL_register.address, ENCM_CTRL_register.sr); }</div>
<div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#ad6192783349219e1a0e47d0274de7559">  308</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#aa507b2715753409574b928857ac08639">TMC2130Stepper::maxspeed</a>(<span class="keywordtype">bool</span> B) { ENCM_CTRL_register.maxspeed  = B; <a class="code" href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">write</a>(ENCM_CTRL_register.address, ENCM_CTRL_register.sr); }</div>
<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a45d957e059ba8d375a4b880254f442f9">  309</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2130_stepper.html#a45d957e059ba8d375a4b880254f442f9">TMC2130Stepper::inv</a>()            { <span class="keywordflow">return</span> ENCM_CTRL_register.inv; }</div>
<div class="line"><a name="l00310"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#aa507b2715753409574b928857ac08639">  310</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2130_stepper.html#aa507b2715753409574b928857ac08639">TMC2130Stepper::maxspeed</a>()       { <span class="keywordflow">return</span> ENCM_CTRL_register.maxspeed; }</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;<span class="comment">// R: LOST_STEPS</span></div>
<div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#ab5b7c77b1826da5c2e40a420880da513">  313</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2130_stepper.html#ab5b7c77b1826da5c2e40a420880da513">TMC2130Stepper::LOST_STEPS</a>() { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">read</a>(<a class="code" href="struct_t_m_c2130_stepper_1_1_l_o_s_t___s_t_e_p_s__t.html#a99a6e65c1815311cbf0d52b52c65ddf1">LOST_STEPS_t::address</a>); }</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160; </div>
<div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a6c11d301314dbbd301615ca3e211ded3">  315</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2130_stepper.html#a2c209b7683446c6a8863868f9dafdc54">TMC2130Stepper::sg_current_decrease</a>(uint8_t value) {</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;  <span class="keywordflow">switch</span>(value) {</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    <span class="keywordflow">case</span> 32: <a class="code" href="class_t_m_c2130_stepper.html#a1935476316e43802ade68dd84d346907">sedn</a>(0b00); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;    <span class="keywordflow">case</span>  8: <a class="code" href="class_t_m_c2130_stepper.html#a1935476316e43802ade68dd84d346907">sedn</a>(0b01); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;    <span class="keywordflow">case</span>  2: <a class="code" href="class_t_m_c2130_stepper.html#a1935476316e43802ade68dd84d346907">sedn</a>(0b10); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    <span class="keywordflow">case</span>  1: <a class="code" href="class_t_m_c2130_stepper.html#a1935476316e43802ade68dd84d346907">sedn</a>(0b11); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;  }</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;}</div>
<div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="class_t_m_c2130_stepper.html#a2c209b7683446c6a8863868f9dafdc54">  323</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2130_stepper.html#a2c209b7683446c6a8863868f9dafdc54">TMC2130Stepper::sg_current_decrease</a>() {</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;  <span class="keywordflow">switch</span>(<a class="code" href="class_t_m_c2130_stepper.html#a1935476316e43802ade68dd84d346907">sedn</a>()) {</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    <span class="keywordflow">case</span> 0b00: <span class="keywordflow">return</span> 32;</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    <span class="keywordflow">case</span> 0b01: <span class="keywordflow">return</span>  8;</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;    <span class="keywordflow">case</span> 0b10: <span class="keywordflow">return</span>  2;</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    <span class="keywordflow">case</span> 0b11: <span class="keywordflow">return</span>  1;</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;  }</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;  <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclass_t_m_c2130_stepper_html_abd1d08df305673b41b1b9c3106fb9c68"><div class="ttname"><a href="class_t_m_c2130_stepper.html#abd1d08df305673b41b1b9c3106fb9c68">TMC2130Stepper::defaults</a></div><div class="ttdeci">void defaults()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00044">TMC2130Stepper.cpp:44</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html_a1b7600aa1d9571c103718c5d3e376675"><div class="ttname"><a href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">SW_SPIClass::transfer16</a></div><div class="ttdeci">uint16_t transfer16(uint16_t data)</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8cpp_source.html#l00046">SW_SPI.cpp:46</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a3850472aefc14da68ece4565fa45e5b0"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a3850472aefc14da68ece4565fa45e5b0">TMC2130Stepper::step</a></div><div class="ttdeci">bool step()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00228">TMC2130Stepper.cpp:228</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ac34bf4add4f669e935f2a91e1b42817c"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ac34bf4add4f669e935f2a91e1b42817c">TMC2130Stepper::toff</a></div><div class="ttdeci">uint8_t toff()</div><div class="ttdef"><b>Definition:</b> <a href="_c_h_o_p_c_o_n_f_8cpp_source.html#l00032">CHOPCONF.cpp:32</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html"><div class="ttname"><a href="class_t_m_c_stepper.html">TMCStepper</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00051">TMCStepper.h:51</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_adde2041047c82600f5e01f52118f92a0"><div class="ttname"><a href="class_t_m_c2130_stepper.html#adde2041047c82600f5e01f52118f92a0">TMC2130Stepper::IOIN</a></div><div class="ttdeci">uint32_t IOIN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00227">TMC2130Stepper.cpp:227</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a8e7d22e8bc39e89b4a02ad1460e4cf25"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a8e7d22e8bc39e89b4a02ad1460e4cf25">TMC2130Stepper::THIGH</a></div><div class="ttdeci">uint32_t THIGH()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00244">TMC2130Stepper.cpp:244</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a2c209b7683446c6a8863868f9dafdc54"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a2c209b7683446c6a8863868f9dafdc54">TMC2130Stepper::sg_current_decrease</a></div><div class="ttdeci">uint8_t sg_current_decrease()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00323">TMC2130Stepper.cpp:323</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ac62d32ad08be0a34b411bdd5a8489246"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ac62d32ad08be0a34b411bdd5a8489246">TMC2130Stepper::push</a></div><div class="ttdeci">void push()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00209">TMC2130Stepper.cpp:209</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ac05adb95ef728ef435bf8798adeda888"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ac05adb95ef728ef435bf8798adeda888">TMC2130Stepper::coil_A</a></div><div class="ttdeci">int16_t coil_A()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00260">TMC2130Stepper.cpp:260</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a5e062fc252bb37ef04ccb6c8b2d248e6"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a5e062fc252bb37ef04ccb6c8b2d248e6">TMC2130Stepper::status_response</a></div><div class="ttdeci">uint8_t status_response</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00329">TMCStepper.h:329</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ae9ccc393519579143c2afb67da9d02a3"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ae9ccc393519579143c2afb67da9d02a3">TMC2130Stepper::ENCM_CTRL</a></div><div class="ttdeci">uint8_t ENCM_CTRL()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00302">TMC2130Stepper.cpp:302</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a6ef670298206ae7bf6baf8475e20ce37"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a6ef670298206ae7bf6baf8475e20ce37">TMC2130Stepper::dco</a></div><div class="ttdeci">bool dco()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00233">TMC2130Stepper.cpp:233</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a1a90b2919efe61dd825552c2fbeca993"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a1a90b2919efe61dd825552c2fbeca993">TMC2130Stepper::DCCTRL</a></div><div class="ttdeci">uint32_t DCCTRL()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00284">TMC2130Stepper.cpp:284</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a4bf494535fd27013899cc325c8b7af4c"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a4bf494535fd27013899cc325c8b7af4c">TMC2130Stepper::TMC_SW_SPI</a></div><div class="ttdeci">SW_SPIClass * TMC_SW_SPI</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00353">TMCStepper.h:353</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a5ba7c4f0262fc2715b47e33c2e419fea"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a5ba7c4f0262fc2715b47e33c2e419fea">TMC2130Stepper::TMC2130Stepper</a></div><div class="ttdeci">TMC2130Stepper(uint16_t pinCS, float RS=default_RS, int8_t link_index=-1)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00007">TMC2130Stepper.cpp:7</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ac4690ace6da9c458fdd2ab9b972c741b"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ac4690ace6da9c458fdd2ab9b972c741b">TMC2130Stepper::spi_speed</a></div><div class="ttdeci">static uint32_t spi_speed</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00351">TMCStepper.h:351</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html"><div class="ttname"><a href="class_s_w___s_p_i_class.html">SW_SPIClass</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8h_source.html#l00006">SW_SPI.h:6</a></div></div>
<div class="ttc" id="astruct_x_d_i_r_e_c_t__t_html_a587afc7ed2594677b6933e82e15f2a9f"><div class="ttname"><a href="struct_x_d_i_r_e_c_t__t.html#a587afc7ed2594677b6933e82e15f2a9f">XDIRECT_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00108">TMC2130_bitfields.h:108</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a4781278716fa3c2a5204bb1b45da4fee"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a4781278716fa3c2a5204bb1b45da4fee">TMC2130Stepper::dc_time</a></div><div class="ttdeci">uint16_t dc_time()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00287">TMC2130Stepper.cpp:287</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_abc48be984238d94bb3b72ed3aa26f028"><div class="ttname"><a href="class_t_m_c2130_stepper.html#abc48be984238d94bb3b72ed3aa26f028">TMC2130Stepper::COOLCONF</a></div><div class="ttdeci">uint32_t COOLCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_c_o_o_l_c_o_n_f_8cpp_source.html#l00008">COOLCONF.cpp:8</a></div></div>
<div class="ttc" id="astruct_x_d_i_r_e_c_t__t_html"><div class="ttname"><a href="struct_x_d_i_r_e_c_t__t.html">XDIRECT_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00105">TMC2130_bitfields.h:105</a></div></div>
<div class="ttc" id="a_t_m_c_stepper_8h_html"><div class="ttname"><a href="_t_m_c_stepper_8h.html">TMCStepper.h</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ac679c29d1462c750e4865028f1b88040"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ac679c29d1462c750e4865028f1b88040">TMC2130Stepper::chain_length</a></div><div class="ttdeci">static int8_t chain_length</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00357">TMCStepper.h:357</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a4d44a7e893bf6c18e0dec7c2f14146cf"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a4d44a7e893bf6c18e0dec7c2f14146cf">TMC2130Stepper::link_index</a></div><div class="ttdeci">int8_t link_index</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00356">TMCStepper.h:356</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a4389f7f07c57d2267351b781c6031fb4"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a4389f7f07c57d2267351b781c6031fb4">TMC2130Stepper::VDCMIN</a></div><div class="ttdeci">uint32_t VDCMIN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00264">TMC2130Stepper.cpp:264</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_aed8aa4583943e649dbf3bb1c1da90d63"><div class="ttname"><a href="class_t_m_c2130_stepper.html#aed8aa4583943e649dbf3bb1c1da90d63">TMC2130Stepper::switchCSpin</a></div><div class="ttdeci">void switchCSpin(bool state)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00061">TMC2130Stepper.cpp:61</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a838f3e6896ee64d6c8e203e9d5883667"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a838f3e6896ee64d6c8e203e9d5883667">TMC2130Stepper::drv_enn_cfg6</a></div><div class="ttdeci">bool drv_enn_cfg6()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00232">TMC2130Stepper.cpp:232</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a43481d6754741d995b69a82e83076573"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a43481d6754741d995b69a82e83076573">TMC2130Stepper::coil_B</a></div><div class="ttdeci">int16_t coil_B()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00261">TMC2130Stepper.cpp:261</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a9617bb918094d98baef1980d0f869dc2"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a9617bb918094d98baef1980d0f869dc2">TMC2130Stepper::version</a></div><div class="ttdeci">uint8_t version()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00234">TMC2130Stepper.cpp:234</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ae54d816846ca2103976f490c5ab8e887"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ae54d816846ca2103976f490c5ab8e887">TMC2130Stepper::tbl</a></div><div class="ttdeci">uint8_t tbl()</div><div class="ttdef"><b>Definition:</b> <a href="_c_h_o_p_c_o_n_f_8cpp_source.html#l00039">CHOPCONF.cpp:39</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_aed0175bff6e80ebc14e0d2606283cbe0"><div class="ttname"><a href="class_t_m_c2130_stepper.html#aed0175bff6e80ebc14e0d2606283cbe0">TMC2130Stepper::read</a></div><div class="ttdeci">uint32_t read(uint8_t addressByte)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00065">TMC2130Stepper.cpp:65</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_aee84a9abfc84b387c6ae5658f90bf684"><div class="ttname"><a href="class_t_m_c2130_stepper.html#aee84a9abfc84b387c6ae5658f90bf684">TMC2130Stepper::GCONF</a></div><div class="ttdeci">uint32_t GCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_o_n_f_8cpp_source.html#l00007">GCONF.cpp:7</a></div></div>
<div class="ttc" id="a_t_m_c___m_a_c_r_o_s_8h_html"><div class="ttname"><a href="_t_m_c___m_a_c_r_o_s_8h.html">TMC_MACROS.h</a></div></div>
<div class="ttc" id="astruct_i_o_i_n__t_html"><div class="ttname"><a href="struct_i_o_i_n__t.html">IOIN_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00067">TMC2130_bitfields.h:67</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html_af260fdc0af3f1312b106483161e559c3"><div class="ttname"><a href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">SW_SPIClass::transfer</a></div><div class="ttdeci">uint8_t transfer(uint8_t ulVal)</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8cpp_source.html#l00024">SW_SPI.cpp:24</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ada185e5fe9970deb7d488cee26314878"><div class="ttname"><a href="class_t_m_c_stepper.html#ada185e5fe9970deb7d488cee26314878">TMCStepper::TMC_WRITE</a></div><div class="ttdeci">static constexpr uint8_t TMC_WRITE</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00114">TMCStepper.h:114</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a67541b27d97ce45f175e9f6e4a2d0bff"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a67541b27d97ce45f175e9f6e4a2d0bff">TMC2130Stepper::CHOPCONF</a></div><div class="ttdeci">uint32_t CHOPCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_c_h_o_p_c_o_n_f_8cpp_source.html#l00007">CHOPCONF.cpp:7</a></div></div>
<div class="ttc" id="astruct_i_o_i_n__t_html_a78bda2f6a9ab0452f569fb95e980bea5"><div class="ttname"><a href="struct_i_o_i_n__t.html#a78bda2f6a9ab0452f569fb95e980bea5">IOIN_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00070">TMC2130_bitfields.h:70</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_aafabeef9ffd19821104d0b00488b7115"><div class="ttname"><a href="class_t_m_c2130_stepper.html#aafabeef9ffd19821104d0b00488b7115">TMC2130Stepper::dc_sg</a></div><div class="ttdeci">uint8_t dc_sg()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00292">TMC2130Stepper.cpp:292</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a1cfb671dae78bb8d5d8aee0402d0c837"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a1cfb671dae78bb8d5d8aee0402d0c837">TMC2130Stepper::dcen_cfg4</a></div><div class="ttdeci">bool dcen_cfg4()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00230">TMC2130Stepper.cpp:230</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html_aa35a68a7e184e42445f391876e58dd68"><div class="ttname"><a href="class_s_w___s_p_i_class.html#aa35a68a7e184e42445f391876e58dd68">SW_SPIClass::init</a></div><div class="ttdeci">void init()</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8cpp_source.html#l00009">SW_SPI.cpp:9</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a1935476316e43802ade68dd84d346907"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a1935476316e43802ade68dd84d346907">TMC2130Stepper::sedn</a></div><div class="ttdeci">uint8_t sedn()</div><div class="ttdef"><b>Definition:</b> <a href="_c_o_o_l_c_o_n_f_8cpp_source.html#l00025">COOLCONF.cpp:25</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a44165ac44cbbe2efb678c764ac5ecf4c"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a44165ac44cbbe2efb678c764ac5ecf4c">TMC2130Stepper::setSPISpeed</a></div><div class="ttdeci">void setSPISpeed(uint32_t speed)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00057">TMC2130Stepper.cpp:57</a></div></div>
<div class="ttc" id="astruct_d_c_c_t_r_l__t_html_afbb03a0028a1f1deaec871923efb876c"><div class="ttname"><a href="struct_d_c_c_t_r_l__t.html#afbb03a0028a1f1deaec871923efb876c">DCCTRL_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00176">TMC2130_bitfields.h:176</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ad207fa693692567d117d4b02c217a4e9"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ad207fa693692567d117d4b02c217a4e9">TMC2130Stepper::PWM_SCALE</a></div><div class="ttdeci">uint8_t PWM_SCALE()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00299">TMC2130Stepper.cpp:299</a></div></div>
<div class="ttc" id="astruct_d_c_c_t_r_l__t_html"><div class="ttname"><a href="struct_d_c_c_t_r_l__t.html">DCCTRL_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00173">TMC2130_bitfields.h:173</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_aca7a615bce307a631a6118fd95cc9195"><div class="ttname"><a href="class_t_m_c2130_stepper.html#aca7a615bce307a631a6118fd95cc9195">TMC2130Stepper::isEnabled</a></div><div class="ttdeci">bool isEnabled()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00207">TMC2130Stepper.cpp:207</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a66812c883dfbb6dedc046a011b2564be"><div class="ttname"><a href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">TMCStepper::TPOWERDOWN</a></div><div class="ttdeci">uint8_t TPOWERDOWN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00123">TMCStepper.cpp:123</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a5db9c2e01d8c1994a5c58d0bf0b1d9b1"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a5db9c2e01d8c1994a5c58d0bf0b1d9b1">TMC2130Stepper::TCOOLTHRS</a></div><div class="ttdeci">uint32_t TCOOLTHRS()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00237">TMC2130Stepper.cpp:237</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_ab5b7c77b1826da5c2e40a420880da513"><div class="ttname"><a href="class_t_m_c2130_stepper.html#ab5b7c77b1826da5c2e40a420880da513">TMC2130Stepper::LOST_STEPS</a></div><div class="ttdeci">uint32_t LOST_STEPS()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00313">TMC2130Stepper.cpp:313</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a45d957e059ba8d375a4b880254f442f9"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a45d957e059ba8d375a4b880254f442f9">TMC2130Stepper::inv</a></div><div class="ttdeci">bool inv()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00309">TMC2130Stepper.cpp:309</a></div></div>
<div class="ttc" id="astruct_t_m_c2130_stepper_1_1_p_w_m___s_c_a_l_e__t_html_aa55b8961cd861f6156aa601d246b13f7"><div class="ttname"><a href="struct_t_m_c2130_stepper_1_1_p_w_m___s_c_a_l_e__t.html#aa55b8961cd861f6156aa601d246b13f7">TMC2130Stepper::PWM_SCALE_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00347">TMCStepper.h:347</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a2d19f2ad93b00b75ffdcdd73275d2f03"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a2d19f2ad93b00b75ffdcdd73275d2f03">TMC2130Stepper::begin</a></div><div class="ttdeci">void begin()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00186">TMC2130Stepper.cpp:186</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a357d105f7350a08dfad82c05a39042eb"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a357d105f7350a08dfad82c05a39042eb">TMC2130Stepper::PWMCONF</a></div><div class="ttdeci">uint32_t PWMCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_p_w_m_c_o_n_f_8cpp_source.html#l00008">PWMCONF.cpp:8</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a6d38cdca5d67036d37e2de754ad6a8e4"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a6d38cdca5d67036d37e2de754ad6a8e4">TMC2130Stepper::_pinCS</a></div><div class="ttdeci">const uint16_t _pinCS</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00352">TMCStepper.h:352</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a200657a7d5d0dbae42f42447e21c58ae"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a200657a7d5d0dbae42f42447e21c58ae">TMC2130Stepper::dir</a></div><div class="ttdeci">bool dir()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00229">TMC2130Stepper.cpp:229</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_aa507b2715753409574b928857ac08639"><div class="ttname"><a href="class_t_m_c2130_stepper.html#aa507b2715753409574b928857ac08639">TMC2130Stepper::maxspeed</a></div><div class="ttdeci">bool maxspeed()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00310">TMC2130Stepper.cpp:310</a></div></div>
<div class="ttc" id="astruct_i_o_i_n__t_html_a3f04842e776dc3d242513f85ad906a92"><div class="ttname"><a href="struct_i_o_i_n__t.html#a3f04842e776dc3d242513f85ad906a92">IOIN_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00068">TMC2130_bitfields.h:68</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a1f26f0ea072d38c0afd20f27563ebb64"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a1f26f0ea072d38c0afd20f27563ebb64">TMC2130Stepper::write</a></div><div class="ttdeci">void write(uint8_t addressByte, uint32_t config)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00148">TMC2130Stepper.cpp:148</a></div></div>
<div class="ttc" id="astruct_t_m_c2130_stepper_1_1_l_o_s_t___s_t_e_p_s__t_html_a99a6e65c1815311cbf0d52b52c65ddf1"><div class="ttname"><a href="struct_t_m_c2130_stepper_1_1_l_o_s_t___s_t_e_p_s__t.html#a99a6e65c1815311cbf0d52b52c65ddf1">TMC2130Stepper::LOST_STEPS_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00348">TMCStepper.h:348</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a597bc308bad0d1198b98c48a6ef34fc3"><div class="ttname"><a href="class_t_m_c_stepper.html#a597bc308bad0d1198b98c48a6ef34fc3">TMCStepper::IHOLD_IRUN</a></div><div class="ttdeci">uint32_t IHOLD_IRUN()</div><div class="ttdef"><b>Definition:</b> <a href="_i_h_o_l_d___i_r_u_n_8cpp_source.html#l00008">IHOLD_IRUN.cpp:8</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_a024b9486d8020acf450798ae80ff4f23"><div class="ttname"><a href="class_t_m_c2130_stepper.html#a024b9486d8020acf450798ae80ff4f23">TMC2130Stepper::dcin_cfg5</a></div><div class="ttdeci">bool dcin_cfg5()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00231">TMC2130Stepper.cpp:231</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ac59a9305aafc64a63698a34cac404788"><div class="ttname"><a href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">TMCStepper::TPWMTHRS</a></div><div class="ttdeci">uint32_t TPWMTHRS()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00133">TMCStepper.cpp:133</a></div></div>
<div class="ttc" id="aclass_t_m_c2130_stepper_html_af486cd4712be021c735fc3bcb8eee9f5"><div class="ttname"><a href="class_t_m_c2130_stepper.html#af486cd4712be021c735fc3bcb8eee9f5">TMC2130Stepper::XDIRECT</a></div><div class="ttdeci">uint32_t XDIRECT()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130_stepper_8cpp_source.html#l00251">TMC2130Stepper.cpp:251</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_94e7a0fbe7f8eaf7f05ee7b02c647e9f.html">source</a></li><li class="navelem"><a class="el" href="_t_m_c2130_stepper_8cpp.html">TMC2130Stepper.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
